<template>
  <div class="home">
    <div><h2>Qwen2.5-0.5B-Instruct测试</h2></div>
    <!-- <div>
      <input v-model="requestBody.query" type="text" />
    </div>
    <div>
      <button @click="doTest">测试请求</button>
    </div> -->
    <ChatAIComponents />
  </div>
</template>

<script>
import ChatAIComponents from "@/components/ChatAIComponents.vue";
export default {
  name: "HomeView",
  components: {
    ChatAIComponents,
  },
  data() {
    return {
      requestBody: {
        query: "你好",
        conversation_id: "",
        history_len: -1,
        history: [],
        stream: false,
        model_name: "Qwen2-0.5B-Instruct",
        temperature: 0.7,
        max_tokens: 0,
        prompt_name: "default",
      },
    };
  },
  methods: {
    async doTest() {
      let res = await this.$http.post("api/chat/chat", this.requestBody);
      console.log(res);
    },
  },
};
</script>
